ci_t
having
CMAPBITS and its maximum value is MAXCML.
The colormap itself has the type of C_MAP
, which
is a structure containing some control parameters
and the primary color arrays pc_t ct[3][MAXCML]
,
where index 0 is red, 1 is green and 2 is blue.
Grayscale images can be represened by colormap based image
and in that case, the image type should be mapg_t
.
B&W images are just sepcial cases of grayscale images
with 2 entries in the colormap.